package im.eg.springdemo.stuffs;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * 定义切面类
 */
@Aspect
@Component
public class LogAspectJ {

    //切点表达式 + 切面类型 + 切面动作
    @Before("execution(* im.eg.springdemo.stuffs.OrderService.addOrder(..))")
    public void myBefore() {
        System.out.println("开动了...");
    }
}